package com.gopay.common.trace.aop;

import com.gopay.common.trace.helper.LogAbstractHelper;
import com.gopay.common.trace.helper.LogOrderAopHelper;
import com.gopay.common.trace.support.LogContext;
import org.aspectj.lang.ProceedingJoinPoint;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * 主订单DAO操作切面
 * Created by xuHui on 2017/4/10.
 * 废弃使用  已经改为  使用注解切面形式
 */
@Deprecated
public class CpsGenMainOrderDAOAspect {

    private static final Logger logger = LoggerFactory.getLogger(CpsGenMainOrderDAOAspect.class);

    private LogContext logContext = LogContext.getContext();

    public Object doAround(ProceedingJoinPoint joinPoint) throws Throwable {

        Object returnValue;
        LogAbstractHelper helper = new LogOrderAopHelper();
        try {

            helper.beforeT();

            returnValue = joinPoint.proceed();

            helper.afterT(joinPoint);
        } catch (Throwable e) {
            helper.exT(e);
            throw e;
        }
        return returnValue;
    }


}


